package com.fand.manager.controller;

import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * Author: zhangjiabin
 * Email: javaboyok@163.com
 * CreateDate: 2021/6/3
 * Version: 1.0
 */
@Controller
public class PageController {

    @GetMapping("/{menu}/{page}.html")
    public String page(@PathVariable("menu") String menu, @PathVariable("page") String page) {
        return menu + "/" + page+".html";
    }

    @GetMapping("/")
    public String indexPage() {
        return "redirect:/index";
    }

    @GetMapping("/login_p")
    public String login() {
        return "login";
    }

    @ApiOperation("进入首页")
    @GetMapping("/index")
    public String index(){
        return "index";
    }

}
